VERSION 1.0 CLASS
BEGIN
  MultiUse = -1  'True
END
Attribute VB_Name = "Cafe4"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = True
'Project:  ETDCI
'Module:   ETDCI.Cafe
'Date:     2011-04-04
'Author:        Joseph Weir
'Version:
'Purpose:  Generate CI from a Package or Shipment destined to be attached as ETD CI.
'

Option Explicit

 
' CI RTF file name
Private Function CI_FILE_PATH() As String
'
    If Windows.ComputerName = "CAN-00325000" Then
        CI_FILE_PATH = "C:\Documents and Settings\563774\My Documents\FXI\Projects\Array\CI.rtf"
    Else
        CI_FILE_PATH = "C:\Documents and Settings\All Users\Application Data\FedEx\Integration\Projects\CI.rtf"
    End If
    
End Function


' CI RTF file name
Private Function CI_OUTPUT_PATH() As String
'
    If Windows.ComputerName = "CAN-00325000" Then
        CI_OUTPUT_PATH = "C:\Documents and Settings\563774\My Documents\"
    Else
        CI_OUTPUT_PATH = "C:\Documents and Settings\All Users\Application Data\FedEx\Integration\Projects\CI\"
    End If
    
End Function
'

'
' Returns the path to the CI RTF file
'
Public Function CreatePackageCI(objPackage As Package, Optional TrackingNumber As String = "") As String

    On Error GoTo ErrorExit
    
    Dim strTemp As String
    Dim objFSO As FileSystemObject
    Dim strData As String
    Dim strKey As String
    Dim lngFile As Long
    Dim strCommodity As String
    Dim objCommodity As Commodity
    Dim i, j As Long
    Dim strTrackingNumber As String
    Dim dblTotalValue As Double
    
    If TrackingNumber <> "" Then
        strTrackingNumber = TrackingNumber
    ElseIf objPackage.ServiceType = fsmGround _
    Or objPackage.ServiceType = fsmHome_Delivery Then
        strTrackingNumber = Cafe1.GetNextTrackingNumber(fsmFDXG)
    Else
        strTrackingNumber = Cafe1.GetNextTrackingNumber(fsmFDXE)
    End If
        
    strKey = strTrackingNumber
    If strKey = "" Then
        strKey = objPackage.Reference
    End If
    If strKey = "" Then
        strKey = objPackage.ShipmentIntegrity
    End If
    If strKey = "" Then
        strKey = objPackage.Recipient.Code
    End If
    If strKey = "" Then
        strKey = Format(Now, "yyyymmddHHnnss")
    End If
    
    Set objFSO = New FileSystemObject
    If objFSO.FileExists(CI_FILE_PATH) Then
        
        lngFile = FreeFile
        Open CI_FILE_PATH For Binary As #lngFile
        strData = String(LOF(lngFile), " ")
        Get #lngFile, , strData
        Close #lngFile
        
        If objPackage.Invoice <> "" Then
            strData = Replace(strData, "<InvoiceNumber>", objPackage.Invoice)
        Else
            strData = Replace(strData, "<InvoiceNumber>", objPackage.Intl.CommercialInvoice.InvoiceNo)
        End If
        strData = Replace(strData, "<PONumber>", objPackage.PurchaseOrder)
        strData = Replace(strData, "<USD>", objPackage.Intl.CurrencyType)
        strData = Replace(strData, "<US>", objPackage.Recipient.Country)
        strData = Replace(strData, "<TrackingNumber>", strTrackingNumber)
        strData = Replace(strData, "<ShipDate>", objPackage.SpecialServices.FutureShipment.ShipDate)
        strData = Replace(strData, "<Reference>", objPackage.Reference)
        strData = Replace(strData, "<Pkgs>", 1)
        
        If objPackage.Sender.Company <> "" Or objPackage.Sender.Contact <> "" Then
            strTemp = IIf(objPackage.Sender.Company <> "", objPackage.Sender.Company, objPackage.Sender.Contact)
            strTemp = strTemp & "\line " & objPackage.Sender.Address1
            If objPackage.Sender.Address2 <> "" Then strTemp = strTemp & "\line " & objPackage.Sender.Address2
            strTemp = strTemp & "\line " & objPackage.Sender.City & ", " & objPackage.Sender.State & "  " & objPackage.Sender.Zip & "  " & objPackage.Sender.Country
            strTemp = strTemp & "\line Phone: " & objPackage.Sender.Phone
            If objPackage.Sender.TaxID <> "" Then strTemp = strTemp & "\line TaxID: " & objPackage.Sender.TaxID
        Else
            With Cafe4.Screen.GetSender
                strTemp = IIf(.Company <> "", .Company, .Contact)
                strTemp = strTemp & "\line " & .Address1
                If .Address2 <> "" Then strTemp = strTemp & "\line " & .Address2
                strTemp = strTemp & "\line " & .City & ", " & .State & "  " & .Zip & "  " & .Country
                strTemp = strTemp & "\line Phone: " & .Phone
                If .TaxID <> "" Then strTemp = strTemp & "\line TaxID: " & .TaxID
            End With
        End If
        strData = Replace(strData, "<Shipper>", strTemp) ' <Shipper>
        
        strTemp = IIf(objPackage.Recipient.Company <> "", objPackage.Recipient.Company, objPackage.Recipient.Contact)
        strTemp = strTemp & "\line " & objPackage.Recipient.Address1
        If objPackage.Recipient.Address2 <> "" Then strTemp = strTemp & "\line " & objPackage.Recipient.Address2
        strTemp = strTemp & "\line " & objPackage.Recipient.City & ", " & objPackage.Recipient.State & "  " & objPackage.Recipient.Zip & "  " & objPackage.Recipient.Country
        strTemp = strTemp & "\line Phone: " & objPackage.Recipient.Phone
        If objPackage.Recipient.TaxID <> "" Then strTemp = strTemp & "\line TaxID: " & objPackage.Recipient.TaxID
        strData = Replace(strData, "<Consignee>", strTemp) ' <Shipper>
                
        strData = Replace(strData, "<SoldTo>", "Consignee") ' <SoldTo>
        
        If objPackage.Intl.CommercialInvoice.Importer.Company <> "" _
        And objPackage.Recipient.Company <> objPackage.Intl.CommercialInvoice.Importer.Company Then
            strTemp = IIf(objPackage.Intl.CommercialInvoice.Importer.Company <> "", objPackage.Intl.CommercialInvoice.Importer.Company, objPackage.Intl.CommercialInvoice.Importer.Contact)
            strTemp = strTemp & "\line " & objPackage.Intl.CommercialInvoice.Importer.Address1
            If objPackage.Intl.CommercialInvoice.Importer.Address2 <> "" Then strTemp = strTemp & "\line " & objPackage.Intl.CommercialInvoice.Importer.Address2
            strTemp = strTemp & "\line " & objPackage.Intl.CommercialInvoice.Importer.City & ", " & objPackage.Intl.CommercialInvoice.Importer.State & "  " & objPackage.Intl.CommercialInvoice.Importer.Zip & "  " & objPackage.Intl.CommercialInvoice.Importer.Country
            strTemp = strTemp & "\line Phone: " & objPackage.Intl.CommercialInvoice.Importer.Phone
            If objPackage.Intl.CommercialInvoice.Importer.TaxID <> "" Then strTemp = strTemp & "\line TaxID: " & objPackage.Intl.CommercialInvoice.Importer.TaxID
            strData = Replace(strData, "<Importer>", strTemp) ' <Importer>
        Else
            strData = Replace(strData, "<Importer>", "Consignee") ' <Importer>
        End If
            
        For Each objCommodity In objPackage.Intl.Commodities
            i = InStr(1, strData, "<LineItem>")
            j = InStr(1, strData, "</LineItem>")
            strCommodity = Mid(strData, i + 16, j - i - 16)
        
            strCommodity = Replace(strCommodity, "<PartNumber>", objCommodity.PartNumber)
            strCommodity = Replace(strCommodity, "<Marks>", objCommodity.MarksNumbers)
            strCommodity = Replace(strCommodity, "<COM>", objCommodity.CountryOfMfg)
            strCommodity = Replace(strCommodity, "<HSCode>", objCommodity.HarmonizedCode)
            strCommodity = Replace(strCommodity, "<Qty>", objCommodity.UnitQuantity)
            strCommodity = Replace(strCommodity, "<UOM>", objCommodity.UnitOfMeasure)
            strCommodity = Replace(strCommodity, "<LineWgt>", objCommodity.Weight)
            strCommodity = Replace(strCommodity, "<WType>", objPackage.WeightType)
            strCommodity = Replace(strCommodity, "<LineValue>", Format(objCommodity.UnitQuantity * objCommodity.UnitValue, "0.00"))
            dblTotalValue = dblTotalValue + objCommodity.UnitQuantity * objCommodity.UnitValue
            strCommodity = Replace(strCommodity, "<ItemDescription>", objCommodity.Description)
        
            strData = Left(strData, j + 16) & strCommodity & Right(strData, Len(strData) - j - 16)
        
        Next objCommodity
        
        ' Remove template commodity
        i = InStr(1, strData, "<LineItem>")
        j = InStr(1, strData, "</LineItem>")
        strData = Left(strData, i - 1) & Right(strData, Len(strData) - j - 10)
        
        strData = Replace(strData, "<ShipWgt>", objPackage.Weight)
        strData = Replace(strData, "<TotalValue>", Format(dblTotalValue, "0.00"))
        strData = Replace(strData, "<Terms>", objPackage.Intl.TermsOfSale)
        If objPackage.Sender.Contact <> "" Then
            strData = Replace(strData, "<ShipperContact>", objPackage.Sender.Contact)
        Else
            strData = Replace(strData, "<ShipperContact>", Cafe4.Screen.GetSender.Contact)
        End If
        strData = Replace(strData, "<ShipDate>", objPackage.SpecialServices.FutureShipment.ShipDate)
        
        strData = Replace(strData, "<Comment1>", objPackage.Intl.CommercialInvoice.Comment1)
        strData = Replace(strData, "<Comment2>", objPackage.Intl.CommercialInvoice.Comment2)
        strData = Replace(strData, "<Comment3>", objPackage.Intl.CommercialInvoice.Comment3)
        
        strData = Replace(strData, "<TrackingNumbers>", strTrackingNumber)
        
        lngFile = FreeFile
        
        If Not objFSO.FolderExists(CI_OUTPUT_PATH) Then
            objFSO.CreateFolder (CI_OUTPUT_PATH)
        End If
        If objFSO.FileExists(CI_OUTPUT_PATH & strKey & "_CI.rtf") Then
            Call objFSO.DeleteFile(CI_OUTPUT_PATH & strKey & "_CI.rtf", True)
        End If
        Open CI_OUTPUT_PATH & strKey & "_CI.rtf" For Binary As #lngFile
        Put #lngFile, , strData
        Close #lngFile
        
        CreatePackageCI = CI_OUTPUT_PATH & strKey & "_CI.rtf"
    
    Else
        Err.Raise 12345, "Cafe1.CreatePackageCI", "File not found (" & CI_FILE_PATH & ")."
    End If

    Exit Function
    
ErrorExit:
    Err.Raise 12345, "Cafe1.CreatePackageCI", Err.Source & ", " & Err.Description
    
End Function


'
' Returns the path to the CI RTF file
'
Public Function CreateShipmentCI(objShipment As Shipment) As String

    On Error GoTo ErrorExit
    
    Dim strTemp As String
    Dim objFSO As FileSystemObject
    Dim strData As String
    Dim strKey As String
    Dim lngFile As Long
    Dim strCommodity As String
    Dim objCommodity As Commodity
    Dim i, j As Long
    Dim strTrackingNumber As String
    Dim objMPSPackage As MPSPackage
    Dim dblWeight As Double
    Dim dblTotalValue As Double
    
    If objShipment.MPS.ServiceType = fsmGround _
    Or objShipment.MPS.ServiceType = fsmHome_Delivery Then
        strTrackingNumber = Cafe1.GetNextTrackingNumber(fsmFDXG)
    Else
        strTrackingNumber = Cafe1.GetNextTrackingNumber(fsmFDXE)
    End If
        
    strKey = strTrackingNumber
    If strKey = "" Then
        strKey = objShipment.MPS.Packages(0).CustomerReference
    End If
    If strKey = "" Then
        strKey = objShipment.MPS.Packages(0).ShipmentID
    End If
    If strKey = "" Then
        strKey = objShipment.MPS.Recipient.Code
    End If
    If strKey = "" Then
        strKey = Format(Now, "yyyymmddHHnnss")
    End If
    
    Set objFSO = New FileSystemObject
    If objFSO.FileExists(CI_FILE_PATH) Then
        
        lngFile = FreeFile
        Open CI_FILE_PATH For Binary As #lngFile
        strData = String(LOF(lngFile), " ")
        Get #lngFile, , strData
        Close #lngFile
        
        If objShipment.MPS.Packages(0).InvoiceNumber <> "" Then
            strData = Replace(strData, "<InvoiceNumber>", objShipment.MPS.Packages(0).InvoiceNumber)
        Else
            strData = Replace(strData, "<InvoiceNumber>", objShipment.MPS.International.CommercialInvoice.InvoiceNo)
        End If
        strData = Replace(strData, "<PONumber>", objShipment.MPS.Packages(0).PurchaseOrder)
        strData = Replace(strData, "<USD>", objShipment.MPS.International.CurrencyType)
        strData = Replace(strData, "<US>", objShipment.MPS.Recipient.Country)
        strData = Replace(strData, "<TrackingNumber>", strTrackingNumber)
        strData = Replace(strData, "<ShipDate>", objShipment.MPS.SpecialServices.FutureShipment.ShipDate)
        strData = Replace(strData, "<Reference>", objShipment.MPS.Packages(0).CustomerReference)
        strData = Replace(strData, "<Pkgs>", 1)
        
        If objShipment.MPS.Sender.Company <> "" Or objShipment.MPS.Sender.Contact <> "" Then
            strTemp = IIf(objShipment.MPS.Sender.Company <> "", objShipment.MPS.Sender.Company, objShipment.MPS.Sender.Contact)
            strTemp = strTemp & "\line " & objShipment.MPS.Sender.Address1
            If objShipment.MPS.Sender.Address2 <> "" Then strTemp = strTemp & "\line " & objShipment.MPS.Sender.Address2
            strTemp = strTemp & "\line " & objShipment.MPS.Sender.City & ", " & objShipment.MPS.Sender.State & "  " & objShipment.MPS.Sender.Zip & "  " & objShipment.MPS.Sender.Country
            strTemp = strTemp & "\line Phone: " & objShipment.MPS.Sender.Phone
            If objShipment.MPS.Sender.TaxID <> "" Then strTemp = strTemp & "\line TaxID: " & objShipment.MPS.Sender.TaxID
        Else
            With Cafe4.Screen.GetSender
                strTemp = IIf(.Company <> "", .Company, .Contact)
                strTemp = strTemp & "\line " & .Address1
                If .Address2 <> "" Then strTemp = strTemp & "\line " & .Address2
                strTemp = strTemp & "\line " & .City & ", " & .State & "  " & .Zip & "  " & .Country
                strTemp = strTemp & "\line Phone: " & .Phone
                If .TaxID <> "" Then strTemp = strTemp & "\line TaxID: " & .TaxID
            End With
        End If
        strData = Replace(strData, "<Shipper>", strTemp) ' <Shipper>
        
        strTemp = IIf(objShipment.MPS.Recipient.Company <> "", objShipment.MPS.Recipient.Company, objShipment.MPS.Recipient.Contact)
        strTemp = strTemp & "\line " & objShipment.MPS.Recipient.Address1
        If objShipment.MPS.Recipient.Address2 <> "" Then strTemp = strTemp & "\line " & objShipment.MPS.Recipient.Address2
        strTemp = strTemp & "\line " & objShipment.MPS.Recipient.City & ", " & objShipment.MPS.Recipient.State & "  " & objShipment.MPS.Recipient.Zip & "  " & objShipment.MPS.Recipient.Country
        strTemp = strTemp & "\line Phone: " & objShipment.MPS.Recipient.Phone
        If objShipment.MPS.Recipient.TaxID <> "" Then strTemp = strTemp & "\line TaxID: " & objShipment.MPS.Recipient.TaxID
        strData = Replace(strData, "<Consignee>", strTemp) ' <Shipper>
                
        strData = Replace(strData, "<SoldTo>", "Consignee") ' <SoldTo>
        
        If objShipment.MPS.International.CommercialInvoice.Importer.Company <> "" _
        And objShipment.MPS.Recipient.Company <> objShipment.MPS.International.CommercialInvoice.Importer.Company Then
            strTemp = IIf(objShipment.MPS.International.CommercialInvoice.Importer.Company <> "", objShipment.MPS.International.CommercialInvoice.Importer.Company, objShipment.MPS.International.CommercialInvoice.Importer.Contact)
            strTemp = strTemp & "\line " & objShipment.MPS.International.CommercialInvoice.Importer.Address1
            If objShipment.MPS.International.CommercialInvoice.Importer.Address2 <> "" Then strTemp = strTemp & "\line " & objShipment.MPS.International.CommercialInvoice.Importer.Address2
            strTemp = strTemp & "\line " & objShipment.MPS.International.CommercialInvoice.Importer.City & ", " & objShipment.MPS.International.CommercialInvoice.Importer.State & "  " & objShipment.MPS.International.CommercialInvoice.Importer.Zip & "  " & objShipment.MPS.International.CommercialInvoice.Importer.Country
            strTemp = strTemp & "\line Phone: " & objShipment.MPS.International.CommercialInvoice.Importer.Phone
            If objShipment.MPS.International.CommercialInvoice.Importer.TaxID <> "" Then strTemp = strTemp & "\line TaxID: " & objShipment.MPS.International.CommercialInvoice.Importer.TaxID
            strData = Replace(strData, "<Importer>", strTemp) ' <Importer>
        Else
            strData = Replace(strData, "<Importer>", "Consignee") ' <Importer>
        End If
            
        For Each objCommodity In objShipment.MPS.International.Commodities
            i = InStr(1, strData, "<LineItem>")
            j = InStr(1, strData, "</LineItem>")
            strCommodity = Mid(strData, i + 16, j - i - 16)
        
            strCommodity = Replace(strCommodity, "<PartNumber>", objCommodity.PartNumber)
            strCommodity = Replace(strCommodity, "<Marks>", objCommodity.MarksNumbers)
            strCommodity = Replace(strCommodity, "<COM>", objCommodity.CountryOfMfg)
            strCommodity = Replace(strCommodity, "<HSCode>", objCommodity.HarmonizedCode)
            strCommodity = Replace(strCommodity, "<Qty>", objCommodity.UnitQuantity)
            strCommodity = Replace(strCommodity, "<UOM>", objCommodity.UnitOfMeasure)
            strCommodity = Replace(strCommodity, "<LineWgt>", objCommodity.Weight)
            strCommodity = Replace(strCommodity, "<WType>", objShipment.MPS.WeightType)
            strCommodity = Replace(strCommodity, "<LineValue>", Format(objCommodity.UnitQuantity * objCommodity.UnitValue, "0.00"))
            dblTotalValue = dblTotalValue + objCommodity.UnitQuantity * objCommodity.UnitValue
            strCommodity = Replace(strCommodity, "<ItemDescription>", objCommodity.Description)
        
            strData = Left(strData, j + 16) & strCommodity & Right(strData, Len(strData) - j - 16)
        
        Next objCommodity
        
        ' Remove template commodity
        i = InStr(1, strData, "<LineItem>")
        j = InStr(1, strData, "</LineItem>")
        strData = Left(strData, i - 1) & Right(strData, Len(strData) - j - 10)
        
        For Each objMPSPackage In objShipment.MPS.Packages
            dblWeight = dblWeight + objMPSPackage.Weight
        Next objMPSPackage
        strData = Replace(strData, "<ShipWgt>", Format(dblWeight, "0.0"))
        strData = Replace(strData, "<TotalValue>", dblTotalValue)
        strData = Replace(strData, "<Terms>", objShipment.MPS.International.TermsOfSale)
        If objShipment.MPS.Sender.Contact <> "" Then
            strData = Replace(strData, "<ShipperContact>", objShipment.MPS.Sender.Contact)
        Else
            strData = Replace(strData, "<ShipperContact>", Cafe4.Screen.GetSender.Contact)
        End If
        strData = Replace(strData, "<ShipDate>", objShipment.MPS.SpecialServices.FutureShipment.ShipDate)
        
        strData = Replace(strData, "<Comment1>", objShipment.MPS.International.CommercialInvoice.Comment1)
        strData = Replace(strData, "<Comment2>", objShipment.MPS.International.CommercialInvoice.Comment2)
        strData = Replace(strData, "<Comment3>", objShipment.MPS.International.CommercialInvoice.Comment3)
        
        strData = Replace(strData, "<TrackingNumbers>", strTrackingNumber)
        
        lngFile = FreeFile
        
        If Not objFSO.FolderExists("CI_OUTPUT_PATH") Then
            objFSO.CreateFolder ("CI_OUTPUT_PATH")
        End If
        If objFSO.FileExists(CI_OUTPUT_PATH & strKey & "_CI.rtf") Then
            Call objFSO.DeleteFile(CI_OUTPUT_PATH & strKey & "_CI.rtf", True)
        End If
        Open CI_OUTPUT_PATH & strKey & "_CI.rtf" For Binary As #lngFile
        Put #lngFile, , strData
        Close #lngFile
        
        CreateShipmentCI = CI_OUTPUT_PATH & strKey & "_CI.rtf"
    
    Else
        Err.Raise 12345, "Cafe1.CreateShipmentCI", "File not found (" & CI_FILE_PATH & ")."
    End If

    Exit Function
    
ErrorExit:
    Err.Raise 12345, "Cafe1.CreateShipmentCI", Err.Source & ", " & Err.Description
    
End Function




Public Sub TestIt(strTrackingNumber As String)

    Dim objFCIL As New FedExCanada.PackageXML
    Dim objPackage As New Package
    Dim objShipment As New Shipment
    Dim objXML As Object
    Set objXML = objFCIL.AfterShipXMLRequest(strTrackingNumber)
    Set objPackage = objFCIL.ShipXML(objShipment, objXML)
    If objPackage.Intl.Commodities.Count > 0 Then
        Debug.Print Cafe4.CreatePackageCI(objPackage, strTrackingNumber)
    End If
    
End Sub


Public Sub TestAll()

Call Cafe4.TestIt("098866970000038")
Call Cafe4.TestIt("154051337336386")
Call Cafe4.TestIt("494814922013")
Call Cafe4.TestIt("514065605521")
Call Cafe4.TestIt("514065605532")
Call Cafe4.TestIt("514065605598")
Call Cafe4.TestIt("514065605602")
Call Cafe4.TestIt("514065605613")
Call Cafe4.TestIt("514065605624")
Call Cafe4.TestIt("514065605635")
Call Cafe4.TestIt("514065605852")
Call Cafe4.TestIt("514065605863")
Call Cafe4.TestIt("514065606035")
Call Cafe4.TestIt("514065606046")
Call Cafe4.TestIt("514065606057")
Call Cafe4.TestIt("514065606068")
Call Cafe4.TestIt("514065606160")
Call Cafe4.TestIt("514065606171")
Call Cafe4.TestIt("514065606182")
Call Cafe4.TestIt("514065606220")
Call Cafe4.TestIt("514065606252")
Call Cafe4.TestIt("514065606300")
Call Cafe4.TestIt("514065606311")
Call Cafe4.TestIt("514065606333")
Call Cafe4.TestIt("514066629606")
Call Cafe4.TestIt("514066629617")
Call Cafe4.TestIt("514066629628")
Call Cafe4.TestIt("514066629639")
Call Cafe4.TestIt("514066629640")
Call Cafe4.TestIt("514066629683")
Call Cafe4.TestIt("514066629694")
Call Cafe4.TestIt("514066629731")
Call Cafe4.TestIt("514066629742")
Call Cafe4.TestIt("514066629753")
Call Cafe4.TestIt("514066629764")
Call Cafe4.TestIt("514066629775")
Call Cafe4.TestIt("639715361355985")
Call Cafe4.TestIt("639715361355992")
Call Cafe4.TestIt("639715361356005")
Call Cafe4.TestIt("639715361356012")
Call Cafe4.TestIt("639715361356029")
Call Cafe4.TestIt("639715361356036")
Call Cafe4.TestIt("639715361356043")
Call Cafe4.TestIt("639715361356050")
Call Cafe4.TestIt("639715361356067")
Call Cafe4.TestIt("639715361356074")
Call Cafe4.TestIt("639715361356081")
Call Cafe4.TestIt("639715361356098")
Call Cafe4.TestIt("639715361356104")
Call Cafe4.TestIt("639715361356111")
Call Cafe4.TestIt("639715361356128")
Call Cafe4.TestIt("639715361356135")
Call Cafe4.TestIt("639715361356142")
Call Cafe4.TestIt("639715361356159")
Call Cafe4.TestIt("639715361356166")
Call Cafe4.TestIt("639715361356173")
Call Cafe4.TestIt("639715361356180")
Call Cafe4.TestIt("639715361356197")
Call Cafe4.TestIt("639715361356203")
Call Cafe4.TestIt("639715361386590")
Call Cafe4.TestIt("639715361386637")
Call Cafe4.TestIt("639715361386644")
Call Cafe4.TestIt("639715361386651")
Call Cafe4.TestIt("639715361386668")
Call Cafe4.TestIt("639715361386675")
Call Cafe4.TestIt("639715361386682")
Call Cafe4.TestIt("639715361386699")
Call Cafe4.TestIt("639715361386705")
Call Cafe4.TestIt("639715361386712")
Call Cafe4.TestIt("639715361386729")
Call Cafe4.TestIt("639715361386736")
Call Cafe4.TestIt("639715361386743")
Call Cafe4.TestIt("639715361386750")
Call Cafe4.TestIt("639715361386767")
Call Cafe4.TestIt("639715361386774")
Call Cafe4.TestIt("639715361386781")
Call Cafe4.TestIt("639715361386798")
Call Cafe4.TestIt("639715361386804")
Call Cafe4.TestIt("639715361402283")
Call Cafe4.TestIt("639715361402290")
Call Cafe4.TestIt("639715361402931")
Call Cafe4.TestIt("639715361402948")
Call Cafe4.TestIt("639715361402955")
Call Cafe4.TestIt("639715361402962")
Call Cafe4.TestIt("639715361402979")
Call Cafe4.TestIt("639715361402986")
Call Cafe4.TestIt("639715361402993")
Call Cafe4.TestIt("639715361403006")
Call Cafe4.TestIt("639715361403013")
Call Cafe4.TestIt("639715361403020")
Call Cafe4.TestIt("639715361403037")
Call Cafe4.TestIt("639715361403044")
Call Cafe4.TestIt("639715361403051")
Call Cafe4.TestIt("639715361403068")
Call Cafe4.TestIt("639715361403075")
Call Cafe4.TestIt("639715361403082")
Call Cafe4.TestIt("639715361403099")
Call Cafe4.TestIt("639715361403105")
Call Cafe4.TestIt("639715361403112")
Call Cafe4.TestIt("639715361403129")
Call Cafe4.TestIt("639715361403136")
Call Cafe4.TestIt("639715361403143")
Call Cafe4.TestIt("639715361403150")
Call Cafe4.TestIt("639715361403167")
Call Cafe4.TestIt("639715364025670")
Call Cafe4.TestIt("639715364025687")
Call Cafe4.TestIt("639715364025694")
Call Cafe4.TestIt("639715364025700")
Call Cafe4.TestIt("639715364025717")
Call Cafe4.TestIt("639715364025724")
Call Cafe4.TestIt("639715364025731")
Call Cafe4.TestIt("639715364025748")
Call Cafe4.TestIt("639715364025755")
Call Cafe4.TestIt("639715364025762")
Call Cafe4.TestIt("639715364025779")
Call Cafe4.TestIt("639715364025786")
Call Cafe4.TestIt("639715364025793")
Call Cafe4.TestIt("639715364025809")
Call Cafe4.TestIt("639715364025816")
Call Cafe4.TestIt("639715364025847")
Call Cafe4.TestIt("639715364025854")
Call Cafe4.TestIt("639715364025861")
Call Cafe4.TestIt("639715364025878")
Call Cafe4.TestIt("639715364025885")
Call Cafe4.TestIt("639715364025892")
Call Cafe4.TestIt("639715364025908")
Call Cafe4.TestIt("639715364025915")
Call Cafe4.TestIt("639715364025922")
Call Cafe4.TestIt("639715364025939")
Call Cafe4.TestIt("639715364025946")
Call Cafe4.TestIt("639715364025953")
Call Cafe4.TestIt("639715364025960")
Call Cafe4.TestIt("639715364025977")
Call Cafe4.TestIt("639715364025984")
Call Cafe4.TestIt("639715364025991")
Call Cafe4.TestIt("639715364026004")
Call Cafe4.TestIt("639715364026011")
Call Cafe4.TestIt("639715364026028")
Call Cafe4.TestIt("639715364026035")
Call Cafe4.TestIt("639715364026042")
Call Cafe4.TestIt("639715364026059")
Call Cafe4.TestIt("639715364026066")
Call Cafe4.TestIt("639715364026073")
Call Cafe4.TestIt("639715364026080")
Call Cafe4.TestIt("639715364026097")
Call Cafe4.TestIt("639715364026103")
Call Cafe4.TestIt("639715364026110")
Call Cafe4.TestIt("639715364026127")
Call Cafe4.TestIt("639715364026134")
Call Cafe4.TestIt("639715364026141")
Call Cafe4.TestIt("639715364026158")
Call Cafe4.TestIt("639715364026165")
Call Cafe4.TestIt("639715364026172")
Call Cafe4.TestIt("639715364026189")
Call Cafe4.TestIt("098866960003667")
Call Cafe4.TestIt("098866960003674")
Call Cafe4.TestIt("098866960003865")

End Sub
